package com.zz.spring6.tx;

import com.zz.spring6.tx.config.SpringConfig;
import com.zz.spring6.tx.controller.BookController;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TesrAnno {

    @Test
    public void testTx() {
        ApplicationContext context =
                new AnnotationConfigApplicationContext(SpringConfig.class);
        BookController accountService = context.getBean("bookController",
                BookController.class);
        Integer[] bookIds = {1,2};
        accountService.checkoutService(bookIds,1);
    }





}
